<?php/** * Created by PhpStorm. * Author: netman * QQ: 1649513971 * Authorize:http://www.stourweb.com * Time: 2020-05-26 16:48 * Desc: */include_once "mysql_p5.php";include_once "mysql_p7.php";class mysql_factory{     public static function init($dbhost,$db,$dbuser,$dbpwd)     {         //小于php7版本         if(version_compare(PHP_VERSION,'7.0.0','le'))         {             $mysql = new mysql_p5($dbhost,$db,$dbuser,$dbpwd);         }         else         {             $mysql = new mysql_p7($dbhost,$db,$dbuser,$dbpwd);         }         return $mysql;     }}